import os
import sys
import posixpath
from django.conf import settings


BASE_DIR = os.path.dirname(__file__)
STATIC_ROOT = os.path.join(os.path.dirname(__file__),'static');

settings.configure(DUBUG = True,
	SECRET_KEY = 'thisisthesecrekey',
	ROOT_URLCONF = 'urls',
	ALLOWED_HOSTS = ['*'],
	MIDDLEWARE_CLASSES = ('django.middleware.common.CommonMiddleware',
		'django.middleware.csrf.CsrfViewMiddleware',
		'django.middleware.clickjacking.XFrameOptionsMiddleware',),
	INSTALLED_APPS=['sitebulider','django.contrib.staticfiles',],
	TEMPLATES=[{
			'BACKEND': 'django.template.backends.django.DjangoTemplates',
			'DIRS':[os.path.join(BASE_DIR, 'sitebulider/templates')],
			'APP_DIRS':True,
		},],
	#STATICFILES_DIRS=(os.path.join(BASE_DIR,'static'),),
	STATIC_URL = '/sitebulider/static/',
	#STATICFILES_DIRS = (
	#	('css',os.path.join(STATIC_ROOT,'css').replace('\\','/')),
	#	('js',os.path.join(STATIC_ROOT,'js').replace('\\','/')),
	#	('images',os.path.join(STATIC_ROOT,'images').replace('\\','/')),
	#	('upload',os.path.join(STATIC_ROOT,'upload').replace('\\','/')),),

	#STATIC_ROOT = os.path.join(BASE_DIR,'static'),
	#STATICFILES_DIRS = (("css", os.path.join(os.path.join(BASE_DIR,'static'),'css')),
	#	("js", os.path.join(os.path.join(BASE_DIR,'static'),'js')),
	#	("images", os.path.join(os.path.join(BASE_DIR,'static'),'images')),),
	#STATICFILES_DIRS = (os.path.join(os.path.join(BASE_DIR,
	#'static')),'/sitebulider/static/', ),
	#STATIC_ROOT = posixpath.join(*(BASE_DIR.split(os.path.sep) + ['static'])),
	#STATIC_ROOT=os.path.join(BASE_DIR, 'static'),
	#STATIC_ROOT = '',#posixpath.join(*(BASE_DIR.split(os.path.sep) +
	#['static'])),
	SITE_PAGE_DIRECTORY = os.path.join(BASE_DIR,'pages'))



if __name__ == "__main__":
    from django.core.management import execute_from_command_line
    execute_from_command_line(sys.argv)
